package net.dfrz.oa.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.dfrz.oa.dao.repository.RoleRepository;
import net.dfrz.oa.pojo.Role;
import net.dfrz.oa.service.RoleService;

@Service
public class RoleServiceImpl implements RoleService{

	@Autowired
	private RoleRepository roleRepository;
	
	/**
	 * 返回登录后用户对应的角色-->可得到权限
	 */
	@Override
	public Role getRoleById(Integer rid) {
		return roleRepository.findOne(rid);
	}
}
